CC			= gcc
C_SRC		= ${wildcard *.c}
BIN 		= ${patsubst %.c, %, $(C_SRC)}

INCDIRS		:=
LIBDIRS		:=

INCDIRS		+= /home/fly/workSpace/SDL2/SDL2-2.0.14/_install/include \
		   	../include
LIBDIRS		+= /home/fly/workSpace/SDL2/SDL2-2.0.14/_install/lib

S_INCDIRS	:=${patsubst %, -I %, $(INCDIRS)}
S_LIBDIRS	:=${patsubst %, -L %, $(LIBDIRS)}


CFLAGS		= -g -Wall $(S_INCDIRS) $(S_LIBDIRS) -lSDL2 -lpthread -lm -ldl

all:$(BIN)

$(BIN):%:%.c
	$(CC) -o $@ $^ $(CFLAGS)

clean:
	$(RM) a.out $(BIN)

.PHONY: all clean
